Skip to content
This repository was archived by the owner on Dec 25, 2024. It is now read-only.

Java, adds checker framework, unused#340

Closed
spacether wants to merge 52 commits intomasterfrom
feat_java_adds_checker_framework
Closed

Java, adds checker framework, unused#340
spacether wants to merge 52 commits intomasterfrom
feat_java_adds_checker_framework

Conversation

@spacether
Copy link
Copy Markdown
Contributor

@spacether spacether commented Dec 18, 2023

Java

  • adds and uses the checker framework
  • NullnessChecker added
  • Fixed errors indicated by NullnessChecker

Some difficulties with Java Typing

  • If type is List<@Nullable List<@Nullable Object>>
  • then all allowed types should actually be the below ones because java treats Nullable T and T as separate classes, where T (NonNull) inherits from Nullable T
  • List<@Nullable List<@Nullable Object>>
  • List<@Nullable List<Object>>>
  • List<List<@Nullable Object>>
  • List<List<Object>>>
  • The only similarity that all of these lists share is that they are List<?> so the validate method is updated to use that input
    Another possible solution is to use @Covariant on an interface that has @Nullable definitions, and then implement that interface in the schema class

Possible solutions:

  • write all allowed above input signatures in the future list builder class
  • write the one signature in a SchemaClsNameNullableValidator where each nullable param is a generic input
    • implement that interface in the schema class, effectively make a new vaidate interface for maps and lists where nullable is possible

todo

  • put input types back into map
  • have them ? extends @nullable blah
  • fix the 303 component schema test errors
  • fix all of the errors in the petstore sample

PR checklist

  • Read the contribution guidelines.
  • Pull Request title clearly describes the work in the pull request and Pull Request description provides details about how to validate the work. Missing information here may result in delayed response from the community.
  • Run the following to build the project and update samples:
    mvn clean package 
    ./bin/generate-samples.sh
    ./bin/utils/export_docs_generators.sh
    
    Commit all changed files.
    This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
    These must match the expectations made by your contribution.
    You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example ./bin/generate-samples.sh bin/configs/python*.
    For Windows users, please run the script in Git BASH.

@spacether
Copy link
Copy Markdown
Contributor Author

Closing this PR because #342 will be used instead

@spacether spacether closed this Dec 22, 2023
@spacether spacether deleted the feat_java_adds_checker_framework branch December 22, 2023 00:18
@spacether spacether changed the title Java, adds checker framework Java, adds checker framework, unused Dec 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant